package com.clinic.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;

@Entity
@PrimaryKeyJoinColumn(name = "dr_obj_id")
public class Doctor extends Patient {

	private static final long serialVersionUID = 1L;

	@Column(insertable = false, updatable = false)
	private int dr_obj_id;
	@Column(length = 1024)
	private String title;
	@Column(length = 128)
	private String specialty;
	@Column(length = 1024)
	private String availability;
	@OneToOne(mappedBy = "doctor")
	private Clinic_config clinic_config;

	public Doctor() {
		super();
	}

	public Doctor(String obj_owner_name, String first_name, String last_name,
			String passwrd, String full_name, String address,
			String email_address, String area, String sub_area,
			boolean is_baby, String mobile_phone, String mobile_phone2,
			String home_phone, Date birthday, boolean gender, String mrn,
			String profile_status, boolean is_clinic_admin, String description,
			String profile_view, int postalcode, String title,
			String specialty, String avaliability) {
		super(obj_owner_name, first_name, last_name, passwrd, full_name,
				address, area, sub_area, email_address, is_baby, mobile_phone,
				mobile_phone2, home_phone, birthday, gender, mrn,
				profile_status, is_clinic_admin, description, profile_view,
				postalcode);
		this.title = title;
		this.specialty = specialty;
		this.availability = avaliability;
	}

	public int getDr_obj_id() {
		return dr_obj_id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSpecialty() {
		return specialty;
	}

	public void setSpecialty(String specialty) {
		this.specialty = specialty;
	}

	public String getAvailability() {
		return availability;
	}

	public void setAvailability(String availability) {
		this.availability = availability;
	}

	public Clinic_config getClinic_config() {
		return clinic_config;
	}

	public void setClinic_config(Clinic_config clinic_config) {
		this.clinic_config = clinic_config;
	}

	public void _toString() {
		System.out.println("Enter - _toString");
		super._toString();
		System.out.println("title: " + this.title + "\nspeciality: "
				+ this.specialty + "\navailability: " + this.availability
				+ "\nclinic_config ID :" + this.clinic_config.getCg_obj_id());
		System.out.println("Exit - _toString");
	}
}